package com.woniu.controller;

import com.woniu.entity.Result;
import com.woniu.service.IDetailedOrderService;
import com.woniu.vo.OrderDetailOrderVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author QiuPeng
 * @since 2022-10-12
 */
@RestController
@RequestMapping("/detailed-order")
@Api(tags = "订单详细信息")
public class DetailedOrderController extends BaseController{

    @Autowired
    private IDetailedOrderService iDetailedOrderService;
    @GetMapping("/{orderId}")
    @ApiOperation("查询订单详细信息")
    public Result searchByOrderId(@PathVariable String orderId){
          OrderDetailOrderVo orderDetailOrderVo =  iDetailedOrderService.searchByOrderId(orderId);

      return toDataResult(orderDetailOrderVo);
    }





}
